package com.cc.controller;

import com.cc.entity.Employee;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/emp")
public class EmpController {
    @RequestMapping("/getList")
    public String getList() {
        return "获取员工列表";
    }
    @RequestMapping("/getEmp")
    public String getEmp() {
        Employee emp = new Employee();
        emp.setId(1);
        emp.setName("张三");
        emp.setEmail("<EMAIL>");
        emp.setAge(18);
        emp.setGender(1);
        emp.setAddress("北京");
        return emp.toString();
    }
    @RequestMapping("/getOneParam")
    public String getOneParam(Integer id) {
        return "获取一个参数：" + id;
    }
    @RequestMapping("/getTwoParam")
    public String getTwoParam(Integer id, String name) {
        return "获取两个参数：" + id + " " + name;
    }
}
